

const M=require("ming_node");

app=M.server()
app.listen(8888)
//视图层为当前目录
app.set("views",".");


app.get("/index",async (req, res) => {
    console.log("req ", req.url)
    dataSource= {
        name:"zs",
        hobby:["烫头","洗脚"]
    }
    //渲染静态目录本地文件
    res.render("/index.html");
    //res.render("/index.html");
    //渲染本地文件
    //res.render("file:D:/G/ming_node/test/test.html");
    //渲染百度首页
    // res.render("https://www.baidu.com/index.html");
})